<?
class My_Helper_MainMenu 
{
	public function mainMenu()
	{
		$return = '';
		$tableCatalog = new Application_Model_Catalog();
		$tableCatalog->initTree();
		$return = $tableCatalog->getPlainTree();
		
/*		if ( $catalogTree ){
			foreach ( $catalogTree as $treeNode ){
				$nodeId = $treeNode->id;
				if ( empty ( $nodeId ) ){
					$return .= "<a class='ajax' href='/catalog/add/p/0' >"._('Create root')."</a>";
					continue; 
				}
				$return .= '<p>';
					$return .=  str_repeat( '&nbsp;', ($treeNode->level-1)*3 );
					$return .= $treeNode->path.' - '.$treeNode->title.'&nbsp;';
					$return .= "<a class='ajax' href='/catalog/add/p/".$nodeId."'>"._('Add child')."</a>";
					$return .= "&nbsp;&nbsp;&nbsp;";
					$return .= "<a class='ajax' href='/catalog/del/p/".$nodeId."' callback='catalogTree.treeUpdate'>"._('Del')."</a>";
				$return .= '</p>';
			}
		}
*/
		return $return; 
	}
	
}